<?php
/**
 * Created by PhpStorm.
 * User: lee
 * Date: 2018/3/14
 * Time: 下午3:43
 */

use Biz\service\trade\Order as sOrder;
use Doraemon\tools\ActionLog;

class MatchingSaveAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_REGISTER;

    public function main()
    {
        $orderPNo = $this->getRequest()->getPost('order_pno');
        $addressId = $this->getRequest()->getPost('address_id',0);
        $addressTipInfo = $this->getRequest()->getPost('address_tipinfo');
        $receiptTimeList = $this->getRequest()->getPost('receipt_time_list');

        if(!empty($addressTipInfo)){
            $addressTipInfo = json_decode($addressTipInfo,true);
        }
        if(!empty($receiptTimeList)){
            $receiptTimeList = json_decode($receiptTimeList,true);
        }
        sOrder::matchingSave($this->uid,$orderPNo,$addressId,$addressTipInfo,$receiptTimeList);

        $this->setSuccess("");

    }
}